from .celery import app


@app.task
def send_sms(phone):
    print('%s 短信发送成功' % phone)
    return 'sms send ok'


@app.task
def create_user(mobile, username, password):
    # 一旦使用了djang内的 就要加载配置
    from user.models import User
    User.objects.create_user(mobile=mobile, username=username, password=password)
    return True
